package cn.kgc.jjl.server;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class TCP01 {
	public static void main(String[] args) throws IOException {
		ServerSocket ss = new ServerSocket(10010);
		Socket s  = ss.accept();
		InputStream is = s.getInputStream();
		byte[ ]bys = new byte[1024];
		int len =is.read(bys);
		String du =new String(bys,0,len);
		System.out.println("服务器："+ du);
		OutputStream os = s.getOutputStream();
		os.write("吴明泽别去卫生间吃粑粑了".getBytes());
		ss.close();
	}

}
